home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 05 - 1989 / 05.12 Dec 89 / AACK Folder / hooks.p < prev    next >
Encoding:
Text File  |  1989-03-30  |  3.8 KB  |  176 lines  |  [TEXT/PJMM]

  1. unit Hooks;
  2.  
  3.  
  4. interface
  5.  
  6.  
  7.     uses
  8.         AppleTalk, Globals, LowLevelATProcs;
  9.  
  10.  
  11.     const
  12.         USERTYPE = 'NATH';
  13.  
  14.  
  15.     procedure SetUpHooksGlobals;
  16.     procedure SetUpHooksMenus;
  17.  
  18.     function HookedMenuChoice (menu, item: Integer): Boolean;
  19.  
  20.     procedure HooksActivateUserWindowProc;
  21.     procedure HooksCloseUserWindowProc;
  22.     procedure HooksDeactivateUserWindowProc;
  23.     procedure HooksUpdateUserWindowProc;
  24.     procedure HooksUserWindowDoContentHit;
  25.  
  26.     procedure ActivateHooksWindow (theWIndow: WindowPtr);
  27.     procedure CloseHooksWindows;
  28.     procedure DeactivateHooksWindow (theWIndow: WindowPtr);
  29.     procedure DoHooksWindowContentHit;
  30.     function SetUpHooksWindows: Boolean;
  31.     procedure UpdateHooksWindow (theWIndow: WindowPtr);
  32.  
  33.     procedure HooksAppleTalkCallChecks;
  34.     function HooksAppleTalkGlobalsSetUp: Boolean;
  35.     procedure HooksCloseUpAppleTalk;
  36.     function HooksRegistered: Boolean;
  37.  
  38.  
  39. implementation
  40.  
  41.  
  42.     procedure SetUpHooksGlobals;
  43.     {This proc allows the hook code to init its globals}
  44.     begin
  45.     end;
  46.  
  47.  
  48.     procedure SetUpHooksMenus;
  49.     {This proc allows the hook code to init its menus}
  50.     begin
  51.     end;
  52.  
  53.  
  54.     function HookedMenuChoice (menu, item: Integer): Boolean;
  55.     {This proc allows the hook code to override menu choices which the generic code}
  56.     {would normally handle, it returns T if it overrode a menu choice}
  57.     begin
  58.     {Assume we're not handling the menu choice}
  59.         HookedMenuChoice := F;
  60.     end;
  61.  
  62.  
  63.     procedure HooksActivateUserWindowProc;
  64.     {This proc is used to override the generic codes activation of the UserWindow}
  65.     begin
  66.     end;
  67.  
  68.  
  69.     procedure HooksCloseUserWindowProc;
  70.     {This proc is used to override the generic codes closing of the UserWindow}
  71.     begin
  72.     end;
  73.  
  74.  
  75.     procedure HooksDeactivateUserWindowProc;
  76.     {This proc is used to override the generic codes deactivation of the UserWindow}
  77.     begin
  78.     end;
  79.  
  80.  
  81.     procedure HooksUpdateUserWindowProc;
  82.     {This proc is used to override the generic codes updating of the UserWindow}
  83.     begin
  84.     end;
  85.  
  86.  
  87.     procedure HooksUserWindowDoContentHit;
  88.     {This proc is used to override the generic codes handling of mouse hits}
  89.     {in the UserWindow}
  90.     begin
  91.     end;
  92.  
  93.  
  94.     procedure ActivateHooksWindow (theWIndow: WindowPtr);
  95.     {This proc is used to activate any windows the hook code created}
  96.     begin
  97.     end;
  98.  
  99.  
  100.     procedure CloseHooksWindows;
  101.     {This proc is used to close any windows the hook code created}
  102.     begin
  103.     end;
  104.  
  105.  
  106.     procedure DeactivateHooksWindow (theWIndow: WindowPtr);
  107.     {This proc is used to deactivate any windows the hook code created}
  108.     begin
  109.     end;
  110.  
  111.  
  112.     procedure DoHooksWindowContentHit;
  113.     {This proc is used to handle mouse hits in any windows the hook code created}
  114.     begin
  115.     end;
  116.  
  117.  
  118.     function SetUpHooksWindows: Boolean;
  119.     {This proc is used to setup any windows the hook code wants to create}
  120.     {and it allows the hook code to set the UserWindowProcsChanged global}
  121.     {it returns T if it succeeds}
  122.     begin
  123.     {Assume error}
  124.         SetUpHooksWindows := F;
  125.  
  126.     {Set to false to show that we dont change any of the UserWindow procs}
  127.         UserWindowProcsChanged := F;
  128.  
  129.     {Return T since we succeeded}
  130.         SetUpHooksWindows := T;
  131.     end;
  132.  
  133.  
  134.     procedure UpdateHooksWindow (theWIndow: WindowPtr);
  135.     {This proc is used to update any windows the hook code created}
  136.     begin
  137.     end;
  138.  
  139.  
  140.     procedure HooksAppleTalkCallChecks;
  141.     {This proc is used to check any ASYNC AppleTalk calls the hook code made}
  142.     begin
  143.     end;
  144.  
  145.  
  146.     function HooksAppleTalkGlobalsSetUp: Boolean;
  147.     {This proc does any AppleTalk setups the hook needs to make, it}
  148.     {returns T if it succeeds}
  149.     begin
  150.     {Assume error}
  151.         HooksAppleTalkGlobalsSetUp := F;
  152.  
  153.     {Return T since we succeeded}
  154.         HooksAppleTalkGlobalsSetUp := T;
  155.     end;
  156.  
  157.  
  158.     procedure HooksCloseUpAppleTalk;
  159.     {This proc does any AppleTalk closeups the hook needs to make}
  160.     begin
  161.     end;
  162.  
  163.  
  164.     function HooksRegistered: Boolean;
  165.     {This allows the hook code to do any AppleTalk calls its needs to make}
  166.     {after the User had registered.   It returns T if it succeed}
  167.     begin
  168.     {Assume error}
  169.         HooksRegistered := F;
  170.  
  171.     {Return T since we succeeded}
  172.         HooksRegistered := T;
  173.     end;
  174.  
  175.  
  176. end.